<br />

<ul id="menu">
	<li>
		<%= link_to "&larr; Назад к списку организаций", organizations_url %>
	</li>
</ul>

<h3><%= @organization.russian_title %> <% if not @organization.foreign_title.empty? %>(<%= @organization.foreign_title %>)<% end %></h3>

<% if @organization.org_logo != nil %>
	Логотип:<br />
	<%= link_to image_tag(@organization.org_logo.public_filename(:thumb)), @organization.org_logo.public_filename %>
	<br />
<% end %>

<% if @organization.org_photo != nil %>
	Фотография:<br />
	<%= link_to image_tag(@organization.org_photo.public_filename(:thumb)), @organization.org_photo.public_filename %>
	<br />
<% end %>

<p>
	<i>Страна юридической регистрации:</i> <strong><%= Country.find(@organization.place).title %></strong>
</p>

<p>
    <i>География охвата деятельности:</i>
	<ul>
	    <% for country in @organization.countries %>
		<li><%= country.title %></li>
		<% end %>
	</ul>
</p>

<p>
	<i>Деятельность организации:</i>
	<ul>
		<% for activity in @organization.activities %>
		<li>
			<% if activity.id != 9 %>
			<%= activity.title %>
			<% end %>
		</li>
		<% end %>
		
		<% for o in @organization.take_parts  %>
			<% if o.activity_id == 9 %>
			<li><%= o.description %></li>
			<% end %>
		<% end %>
	</ul>
</p>

<p>
    <i>Дополнтельная информация</i>
    <p><%= @organization.misc %><p>
</p>

<p>    
	<i>Контактная информация:</i><br />
	<table width="100%" cellspacing="0" cellpadding="5" border="0">
	    <colgroup width="30%" />
		<colgroup />
		<tr>
		    <td>Телефон 1:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.phone %></strong></td>
		</tr>
		<tr>
			<td>Телефон 2:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.phone1 %></strong></td>
		</tr>
		<tr>
			<td>Телефон 3:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.phone2 %></strong></td>
		</tr>
		<tr>
		    <td>Факс:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.fax %></strong></td>
		</tr>
		<tr>
			<td>ICQ:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.icq %></strong></td>
		</tr>
		<tr>
			<td>Skype:</td>
			<td style="padding-left: 10px;"><strong><%= @organization.skype %></strong></td>
		</tr>
		<tr>
		    <td>Эл. почта 1:</td>
			<td style="padding-left: 10px;">
				<strong><a href="mailto:<%= @organization.email %>"><%= @organization.email %></a></strong>
			</td>
		</tr>
		<tr>
			<td>Эл. почта 2:</td>
			<td style="padding-left: 10px;">
				<strong><a href="mailto:<%= @organization.email1 %>"><%= @organization.email1 %></a></strong>
			</td>
		</tr>
		<tr>
			<td>Эл. почта 3:</td>
			<td style="padding-left: 10px;">
				<strong><a href="mailto:<%= @organization.email2 %>"><%= @organization.email2 %></a></strong>
			</td>
		</tr>
		<tr>
		   <td>Сайт:</td> 
		   <td style="padding-left: 10px;">
		     <strong><a href="<%= @organization.url %>" target="_blank"><%= @organization.url %></a></strong>
		   </td>
		</tr>
		<tr>
		   <td>Адрес<br />на русском языке:</td> 
		   <td style="padding-left: 10px;" valign="top">
			 <strong><%= @organization.russian_post_address %></strong>
		   </td>
		</tr>
		<tr>
		   <td>Адрес<br />на иностранном языке:</td> 
		   <td style="padding-left: 10px;" valign="top">
			 <strong><%= @organization.foreign_post_address %></strong>
		   </td>
		</tr>
	</table>
</p>

<p>
    <i>Руководители:</i>
	<% for person in @organization.people %>
		<% unless person.fullname.empty? %>
		<div style="float: left; padding-right: 50px;">
		  <% if person.is_main %><strong><% end %>
		  <%= person.fullname %>
		  <% if person.is_main %></strong><% end %>
		  <br />
		  
		  <%= person.post %><br /><br />
   
		  <% if person.person_photo != nil %>
			<%= link_to image_tag(person.person_photo.public_filename(:thumb)), person.person_photo.public_filename %>
		  <% end %><br /><br />
   
		  <% if logged_in? and (current_user.role == 1 or organization.user.id == current_user.id )%>
			<% if person.person_photo.nil? %>
				<%= link_to "Добавить фотографию +", :controller => "person_photos", :action => "new", :person_id => person.id, :organization_id => person.organization.id %> 
			<% else %>
				<%= link_to "Изменить фотографию +", :controller => "person_photos", :action => "edit", :person_id => person.id, :organization_id => person.organization.id, :person_photo_id => person.person_photo.id %> 
			<% end %>
		  <% end %>
		</div>
		<% end %>
	<% end %>
	<div style="clear: both;"><!-- --></div>
</p>

<br />